package com.itheima;

public class ArithmeticOperator {
    public static void operator1(){
        int a = 10;
        int b = 10;
        int a1 = 10;
        int b1 = 10;
        a++;
        ++b;
        System.out.println("a原值"+a1);
        System.out.println("b原值"+b1);
        System.out.println("单独使用a++:"+a);
        System.out.println("单独使用++b:"+b);
        System.out.println("-------------------------------------------");

    }

    public static void operator2(){
        int a = 10;
        int b = 10;
        int a1 = 10;
        int b1 = 10;
        int res1 = a++;
        int res2 = ++b;
        System.out.println("a原值"+a1);
        System.out.println("b原值"+b1);
        System.out.println("单独使用a++:"+a);
        System.out.println("单独使用++b:"+b);
        System.out.println("非单独使用a++:"+res1);
        System.out.println("非单独使用++b:"+res2);
        System.out.println("-------------------------------------------");
    }
    public static void main(String[] args) {
        operator1();
        operator2();
    }
}
